package cn.itcast.dome;

import cn.itcast.entity.Account;
import cn.itcast.service.AccountService;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.List;

public class SmDemo {
    public static void main(String[] args) {

        ClassPathXmlApplicationContext ac = new ClassPathXmlApplicationContext("spring.xml");
        AccountService accountService = ac.getBean(AccountService.class);
        // todo 测试spring整合与否...
        List<Account> list = accountService.findAll();
        list.forEach(System.out::println);
        System.out.println(list.size());

        /*List<Dept> dept = accountService.findDept();
        System.out.println(dept.size());*/

        //Account account = accountService.getById(4);
        //System.out.println(account);

        /*List<Dept> deptList = accountService.findDept();
        deptList.forEach(System.out::println);
        //System.out.println(deptList.size());
        log.info("sss{}",deptList.size());*/

        /*List<envAlertDate> list = accountService.findList();
        list.forEach(System.out::println);
        System.out.println(list.size());*/

    }
}
